<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        [name] {
            color: red;
        }
        [value] {
            color: blue;
        }
        [id] {
            font-weight: bold;
        }

        p[title] {
            color:blue;
        }
        p [title] {
            color:blue;
        }
    </style>
</head>
<body>
<div id="id1">aaa</div>
<input type="text" value="bbbbbbbbbbbb">
<p name="xxx">xxxxxxxxxxxxxxxxxxxxxxxxxx</p>

<p title="xx">这个有title
    <span title="a">xxxxx</span>
</p>
<p title="xx">这个有title</p>
<p title="xx">这个有title</p>
<p>没有title</p>
<p>没有title</p>
</body>
</html>